/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.model.generators.modelproviders;

import java.awt.Color;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.animationTime.Timeline;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.interpolators.Linear;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.transformations.Shear;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.ModelChangeEvent;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.ModelChangeListener;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.VisualJavaFxModelProvider;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelCanvasGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelCircleGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelFrameGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelShearGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Application;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Canvas;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Frame;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.shapes.Circle;

/**
 *this is a model with a circle and two Shears
 * @author Admin
 */


public class CircleTest3Provider implements VisualJavaFxModelProvider{

    @Override
    public Application getModel() {
        Application app = new Application();
        ArrayList<Frame> frames = app.getFrames();
        Canvas can = ModelCanvasGenerator.generateCanvas(Color.PINK);

        Circle c = ModelCircleGenerator.generateCircle(500, 300, 400, Color.RED, Color.GREEN,
                5);

        Shear x = ModelShearGenerator.generateShear(10, 0, new Linear());
        Shear y = ModelShearGenerator.generateShear(0, 10, new Linear());

        
        Timeline timeline = c.getTimeline();
        timeline.getKeyFrameAt(4).getTransformations().add(x);
        timeline.getKeyFrameAt(8).getTransformations().add(y);

        can.getContent().add(c);

        Frame f = ModelFrameGenerator.generateFrame(1000, 800, 50, 50, "test", can);
        frames.add(f);
        return app;
    }


    @Override
    public void addModelChangeListener(ModelChangeListener listener) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void notifyModelChange(ModelChangeEvent evt) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void removeModelChangeListener(ModelChangeListener listener) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
